#include <stdio.h>

// 函数声明
char * my_strcpy(char *buf_2, const char *buf_1);

int main(int argc, char const *argv[])
{
    char buf_1[128] = "王五磊哥\n";
    char buf_2[128] = "张三";

    for (int i = 0; buf_1[i] != '\0'; i++)
    {
        printf("%d\n" , buf_1[i]);
    }

    my_strcpy( buf_2 ,  buf_1);
    printf("最终输出：%s\n" , buf_2);

    return 0;
}

// 函数定义
char * my_strcpy(char *buf_2, const char *buf_1)
{
    size_t i = 0;

    for (i = 0; buf_1[i] != '\0' ; i++)
    {
        buf_2[i] = buf_1[i];
    }
    
    buf_2[i] = buf_1[i];
}
